<template>
  <div>
    <!-- 背景图 -->
    <div class="home">
           <img src="@/assets/img/bg@2x.png" alt="" style="margin-bottom:52px;" />
      <img src="@/assets/img/pic@2x.png" alt="" />
      <div class="homeTop">
        <img src="@/assets/img/logo@2x.png" alt="" class="homeLogo" />
        <div class="homeStart">{{ $t('Start_charging') }}</div>
        <div class="homeStart homeStart2">{{ $t('AnywhereAnytime') }}</div>
      </div>
    </div>

    <!-- 提示 -->
    <van-overlay
      :show="showTip"
      z-index="99999"
      :custom-style="{ background: 'rgba(255,255,255,0)' }"
    >
      <div class="wrapper">
        <div class="textTip">
          <img src="@/assets/img/ic_warn@2x.png" alt="" class="tipImg" />{{
            $t('handleAgain')
          }}
        </div>
      </div>
    </van-overlay>
  </div>
</template>

<script>
export default {
  data () {
    return {
      showTip: true // 显示结果遮罩层
    }
  },
  created () {
    this.getLang()
  },
  mounted () {},
  methods: {
    // 获取系统语言
    getLang () {
      let langArr = this.global.terminal.language.split('-')
      let lang = langArr[0].toLocaleUpperCase()
      const langAll = ['EN', 'ZH', 'ES']
      if (!langAll.includes(lang)) {
        lang = 'EN'
      }
      this.$store.commit('SET_LANG', lang)
      this.$i18n.locale = lang
    }
  }
}
</script>

<style scoped lang="scss"></style>
